package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GarbageClassMapper;
import com.ruoyi.system.domain.GarbageClass;
import com.ruoyi.system.service.IGarbageClassService;
import com.ruoyi.common.core.text.Convert;

/**
 * 垃圾分类 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-07
 */
@Service
public class GarbageClassServiceImpl implements IGarbageClassService 
{
	@Autowired
	private GarbageClassMapper garbageClassMapper;

	/**
     * 查询垃圾分类信息
     * 
     * @param id 垃圾分类ID
     * @return 垃圾分类信息
     */
    @Override
	public GarbageClass selectGarbageClassById(Long id)
	{
	    return garbageClassMapper.selectGarbageClassById(id);
	}
	
	/**
     * 查询垃圾分类列表
     * 
     * @param garbageClass 垃圾分类信息
     * @return 垃圾分类集合
     */
	@Override
	public List<GarbageClass> selectGarbageClassList(GarbageClass garbageClass)
	{
	    return garbageClassMapper.selectGarbageClassList(garbageClass);
	}
	
    /**
     * 新增垃圾分类
     * 
     * @param garbageClass 垃圾分类信息
     * @return 结果
     */
	@Override
	public int insertGarbageClass(GarbageClass garbageClass)
	{
	    return garbageClassMapper.insertGarbageClass(garbageClass);
	}
	
	/**
     * 修改垃圾分类
     * 
     * @param garbageClass 垃圾分类信息
     * @return 结果
     */
	@Override
	public int updateGarbageClass(GarbageClass garbageClass)
	{
	    return garbageClassMapper.updateGarbageClass(garbageClass);
	}

	/**
     * 删除垃圾分类对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteGarbageClassByIds(String ids)
	{
		return garbageClassMapper.deleteGarbageClassByIds(Convert.toStrArray(ids));
	}
	
}
